﻿@model BlogAug22.Models.IndexVM

<br />
<a class="btn center btn-default" href="/Home/Edit/@Model.MyPosts[0].ID">Edit</a>
<div class="panel panel-default">
    <div class="panel-body">
        <div style="text-align:center">
            <h2>@Model.MyPosts[0].Post</h2>
            <h4>- @Model.MyPosts[0].Name</h4>
            <p>@Model.MyPosts[0].Blog</p>
           
            <a class="btn center btn-default" href="/Home/AddComment/@Model.MyPosts[0].ID">Add Comments</a>
            <h5>Comments:</h5>
            @foreach (var a in @Model.Comments)
            {
                <h5>@a.Comment</h5><h6>- @a.Name</h6>

                <form method="post" action="/Home/DeleteComment/@a.CommentID">
                    <input type="submit" value="Delete" class="btn btn-default" /><br />
                </form>
            }
        </div>
    </div>
</div>
